<template>
  <div id="he-plugin-standard"></div>
</template>
<script>
  window.WIDGET = {
    CONFIG: {
      layout: '1',
      width: '600',
      height: '141',
      background: '1',
      dataColor: 'FFFFFF',
      borderRadius: '5',
      key: 'fcd4fc1e48a144a483b7af74284229b8',
    },
  };
  import { defineComponent, onMounted } from 'vue';
  export default defineComponent({
    //vue3.0的写法
    setup() {
      onMounted(() => {
        weather();
      });
      const weather = () => {
        const s = document.createElement('script');
        s.type = 'text/javascript';
        s.src = 'https://widget.qweather.net/standard/static/js/he-standard-common.js?v=2.0';
        document.body.appendChild(s);
      };

      return {};
    },
  });
</script>
